<template>
  <div class="sgjg">

    <el-form :model="myForm" label-width="80px" ref="myForm">
      <el-form-item>
        <label class="label">今日维修计划</label>
        <span class="date-span"><el-date-picker class="date" placeholder="选择日期" type="date" v-model="myForm.date"></el-date-picker></span>
      </el-form-item>
      <el-form-item label="区间">
        <el-input v-model="myForm.qujian"></el-input>
      </el-form-item>
      <el-form-item label="类型">
        <el-select :value="myForm.type">
          <el-option v-for="item in items" :key="item" :label="item" :value="item">
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="时间">
        <el-col :span="11">
          <el-time-picker format="hh:mm A" placeholder="选择时间" style="width: 100%;" v-model="myForm.time1"></el-time-picker>
        </el-col>
        <el-col :span="2" class="line">-</el-col>
        <el-col :span="11">
          <el-time-picker format="hh:mm A" placeholder="选择时间" style="width: 100%;" v-model="myForm.time2"></el-time-picker>
        </el-col>
      </el-form-item>
      <el-form-item label="负责人">
        <el-input v-model="myForm.people"></el-input>
      </el-form-item>
      <el-form-item  label="作业内容">
        <el-input :rows="11" height="200px" resize="false" type="textarea" v-model="myForm.context"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button @click="onSubmit" type="primary">立即创建</el-button>
        <el-button @click="resetForm()">重置</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
  export default {
    name: "WXJH",
    data(){
      return{
        myForm:{
          time1:'',
          time2:'',
          date:'',
          type:'',
          qujian:'',
          context:'',
          people:'',
        },
        items: ['Ⅰ级维修','Ⅱ级维修','点外A类','点外B类'],
      }
    },
    created() {
      this.myForm.date = new Date();
    },
    methods:{
      onSubmit(){

      },
      resetForm() {
        this.myForm.context=''
        this.myForm.time1=''
        this.myForm.people=''
        this.myForm.type=''
        this.myForm.time2=''
        this.myForm.qujian=''
        this.myForm.date=new Date()
      }
    }
  }
</script>

<style lang="less" scoped>
  .label{
    font-size: 22px;
    color: #55a532;
    padding: 10px;
  }
  .sgjg{
    padding: 20px 80px;
  }
  .date-span{
    padding: 20px;
    .date{
      width: 140px; float:right;
    }
  }

</style>
